package com.qiangqiang.resoldhouse.util;

import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;

/**
 * @author : sky
 * @date : 2018/7/15
 * @description :
 */
public class TimeFormat {

    /**
      * @author sky
      * @date 2018/7/15
      * @param [time]
      *         time: Long型的时间
      * @return java.lang.String
      * @describe: 时间转换 Long --> String
     */
    public static String converTime(long time){
        DateTimeFormatter dtf= DateTimeFormatter.ofPattern("yyyy-MM-dd");
        return dtf.format(LocalDateTime.ofInstant(Instant.ofEpochMilli(time),ZoneId.systemDefault()));
    }
}
